package com.xbongbong.pro.aiassistant.service;

import com.xbongbong.paas.domain.entity.ext.PaasFormDataEntityExt;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.pro.domain.entity.AiAssistantHistoryEntity;
import com.xbongbong.pro.smartsettings.pojo.dto.SmartStrategyRabbitMqDTO;

import java.util.List;
import java.util.Map;

/**
 * @description: 智能助手es查询
 * @Author: hongxiao
 * @date: 2019-05-09 10:13
 * @since v1.0
 */
public interface SmartSettingsEsService {
    /**
     * 通过es获取数据的ids
     *
     * @param rabbitMqDTO 入参
     * @return
     * @throws
     * @author hongxiao
     * @date: 2019-05-09 14:01
     * @version v1.0
     * @since v1.0
     */
    void getDataIds(SmartStrategyRabbitMqDTO rabbitMqDTO, Map<Long, List<Long>> dataIdsMap);

    /**
     * 获取数据列表
     *
     * @param rabbitMqDTO 智能助手数据
     * @param dataIdsMap  数据ids
     * @return java.util.List<com.xbongbong.paas.domain.entity.ext.PaasFormDataEntityExt>
     * @throws
     * @author hongxiao
     * @date 2019-05-13 15:02
     * @version v1.0
     * @since v1.0
     */
    void getFormDataList(SmartStrategyRabbitMqDTO rabbitMqDTO, Map<Long, List<Long>> dataIdsMap, Map<Integer, List<PaasFormDataEntityExt>> saasDataList, List<PaasFormDataEntityExt> paasDataList) throws XbbException;

    /**
     * 从待失效的记录数据中获取有效数据ids
     *
     * @param rabbitMqDTO 入参
     * @param waitInvalidIdsMap 待失效的记录数据ids
     * @param waitInvalidListMap 待失效的记录数据列表
     * @return
     * @throws
     * @author hongxiao
     * @date 2019-08-25 17:20
     * @since v1.0
     * @version v1.0
     */
    Map<Long, List<Long>> getValidDataIds(SmartStrategyRabbitMqDTO rabbitMqDTO, Map<Long, List<Long>> waitInvalidIdsMap, Map<Long, List<AiAssistantHistoryEntity>> waitInvalidListMap);


    List<PaasFormDataEntityExt> getPaasDataList(String corpid, Integer saasMark, List<Long> paasDataIds);

    List<PaasFormDataEntityExt> getSaasDataList(String corpid, Integer businessType, List<Long> paasDataIds);
}
